package com.itheima.Jiuye09;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Zuoye {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Map<Integer,String> mp = new HashMap<>();
        mp.put(1930,"乌拉圭");
        mp.put(1934,"意大利");
        mp.put(1938,"意大利");
        mp.put(1950,"乌拉圭");
        mp.put(1954,"西德");
        mp.put(1958,"巴西");
        mp.put(1962,"巴西");
        mp.put(1966,"英格兰");
        mp.put(1970,"巴西");
        mp.put(1974,"西德");
        mp.put(1978,"阿根廷");
        mp.put(1982,"意大利");
        mp.put(1986,"阿根廷");
        mp.put(1990,"西德");
        mp.put(1994,"巴西");
        mp.put(1998,"法国");
        mp.put(2002,"巴西");
        mp.put(2006,"意大利");
        mp.put(2010,"西班牙");
        mp.put(2014,"德国");
        Set<Map.Entry<Integer, String>> entries = mp.entrySet();
        System.out.println("请输入年份：");
         int a = sc.nextInt();

        for (Map.Entry<Integer, String> entry : entries) {
            Integer key = entry.getKey();
            String value = entry.getValue();
            if (key == a){
               // boolean b = mp.containsKey(key);
                System.out.println(value);
            }

        }
    }
}
